<template>
  <div>
    <van-steps direction="vertical" :active="0" v-if="list.length > 0">
      <van-step v-for="(item, index) in list" :key="index">
        <h3>{{item.status}}</h3>
        <p>{{item.time}}</p>
      </van-step>
    </van-steps>
    <no-data v-else></no-data>
  </div>
</template>

<script>
import Vue from 'vue'
import noData from '@/components/noData/index'
import { Step, Steps } from 'vant'
import { getExpressInfo } from '@/api/order/order.js'
Vue.use(Step)
Vue.use(Steps)

export default Vue.extend({
  components: {
    noData
  },
  data() {
    return {
      list: []
    }
  },
  created() {
    const { order_id } = this.$route.query
    getExpressInfo({ type: 1, id: order_id }).then(res => {
      if (res.status == 1) {
        this.list = res.data.result.list
      }
    })
  }
})
</script>